package cn.bs.busuo.account.dao.persist.repository;

import cn.bs.busuo.account.pojo.cachevo.CacheUserStandardVO;
import cn.bs.busuo.account.pojo.entity.*;
import cn.bs.busuo.account.pojo.param.SetAdminParam;
import cn.bs.busuo.account.pojo.vo.*;
import cn.bs.busuo.common.pojo.vo.PageData;

import java.time.LocalDateTime;
import java.util.List;

public interface IUserRepository {
    int ifUserExits(Long userId);
//    int deleteById(Long id);
//    int deleteById1(Long id);
    int countByUsername(String username);
    int insert(User user);
    Long selectIdByUsername(String username);
    int newUserRole(UserRole userRole);
    int updateById(User user);
    int updatePassword(User user);
    UserStandardVO getStandardById(Long id);
    PageData<CacheUserStandardVO> list(Integer pageNum, Integer pageSize);
    String selectUserPasswordById(Long id);

    int selectUserRoleIfExits(SetAdminParam setAdminParam);

    int setUserRole(UserRole userRole);

    int deleteUserRole(SetAdminParam setAdminParam);

    List<AdminUserVO> adminList();
}
